import App from './App'
import './uni.scss'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import req from './utils/req.js'

Vue.config.productionTip = false
App.mpType = 'app'

// 添加全局云对象请求方法
Vue.prototype.$req = req;

const app = new Vue({
  ...App
})

// 注册图标管理插件
Vue.prototype.$iconManager = iconManager;

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import req from './utils/req.js'

export function createApp() {
  const app = createSSRApp(App)
  
  // 添加全局云对象请求方法
  app.config.globalProperties.$req = req;
  
  return {
    app
  }
}
// #endif